Spread for ASP.NET 11 Product Documentation
ListBoxCellType Constructor(String[],String[])
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ListBoxCellType Class > ListBoxCellType Constructor : ListBoxCellType Constructor(String[],String[])
Items for the list specified in a string array
Values for the list items specified in a string array
Creates a new list box cell with the specified list items and corresponding values.
Syntax
'Declaration
 
Public Function New( _
   ByVal items() As String, _
   ByVal values() As String _
)
'Usage
 
Dim items() As String
Dim values() As String
 
Dim instance As New ListBoxCellType(items, values)
public ListBoxCellType( 
   string[] items,
   string[] values
)

Parameters

items
Items for the list specified in a string array
values
Values for the list items specified in a string array
Example
This example creates a list box cell type, sets up an array of items for the list, sets the background and foreground color for the selected item and assigns the object to the first cell in the sheet.
Dim lbstr As String()
lbstr = new String() {"Carbon", "Oxygen", "Hydrogen"}
Dim strval As String()
strval = new String() {"1", "2", "3"}
Dim lbcell As new FarPoint.Web.Spread.ListBoxCellType(lbstr, strval)
lbcell.SelectedBackColor = Color.Yellow
lbcell.SelectedForeColor = Color.DarkBlue
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = lbcell
FpSpread1.ActiveSheetView.SetValue(0, 0, "3")
FpSpread1.ActiveSheetView.Rows(0).Height = 140
Dim lbstr As String()
lbstr = New String() {"Carbon", "Oxygen", "Hydrogen"}
Dim strval As String()
strval = New String() {"1", "2", "3"}
Dim lbcell As New FarPoint.Web.Spread.ListBoxCellType(lbstr, strval)
lbcell.SelectedBackColor = Color.Yellow
lbcell.SelectedForeColor = Color.DarkBlue
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = lbcell
FpSpread1.ActiveSheetView.SetValue(0, 0, "3")
FpSpread1.ActiveSheetView.Rows(0).Height = 140
See Also

Reference

ListBoxCellType Class
ListBoxCellType Members
Overload List
Items Property